﻿using Prism.Events;
using Prism.Services.Dialogs;
using Prism.Ioc;

namespace System
{
    /// <summary>
    /// 全局对象类
    /// </summary>
    public class GlobalManager
    {
        private static IEventAggregator _eventAggregator;
        /// <summary>
        /// 事件发布/订阅对象
        /// </summary>
        public static IEventAggregator EventAggregator => _eventAggregator ?? (_eventAggregator = ContainerLocator.Container.Resolve<IEventAggregator>());

        #region 接口

        private static IDialogService _DialogService;
        /// <summary>
        /// 弹窗
        /// </summary>
        public static IDialogService DialogService => _DialogService ?? (_DialogService = ContainerLocator.Container.Resolve<IDialogService>());
        #endregion

    }
}
